package com.turing.post.account.util;

import java.math.BigInteger;
import java.util.Date;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
/**
 * 主帐户业务接口
 * @author ZXL
 *
 */
@Remote
@Local
public interface MasterAccountBusiness {

	/**
	 * 创建主帐户
	 * @param issueCompanyNo 发卡商编号
	 * @param openTime 开户时间
	 * @param cardNo 卡号 
	 * @param ownerId 帐户户主ID
	 * @param remark 备注
	 * @return 主帐号
	 * @throws PCPSApplicationException 异常信息
	 */
	public BigInteger createMasterAccount(String issueCompanyNo, Date openTime,
			String cardNo, BigInteger ownerId, String remark)
			throws PCPSApplicationException;

	/**
	 * 更新主帐户余额
	 * 
	 * @param masterAccNo
	 *            子帐号
	 * @param amount
	 *            发生额
	 * @param accTime
	 *            记帐时间
	 * @return 更新后余额
	 * @throws PCPSApplicationException 异常信息
	 */
	public BigInteger updateBalance(BigInteger masterAccNo, BigInteger amount,
			Date accTime) throws PCPSApplicationException;
}
